import { NODES } from '@/config'
export default {
  method: 'get',
  url: '/api/logs/config_data',
  transformParam: () => {
    return {
      key: NODES,
    }
  },
  defaultValue: [],
  transformResponse: response => {
    const { data = {} } = response

    const { content } = data
    try {
      const items = content === '' ? [] : JSON.parse(content)
      return items
    } catch (e) {
      console.error('getBusinessData error', e)
      return []
    }
  },
}
